import Vue from 'vue'
import Router from 'vue-router'
import home from './views/home.vue'

Vue.use(Router)

export default new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [{
            path: '/',
            name: 'home',
            component: home,
            meta: {
                title: '[ QQ红包 恭喜发财 ] 答题红包网页版'
            }
        },
        {
            path: '/hongbao',
            name: 'hongbao',
            component: () =>
                import ('@/components/hongbao.vue'),
            meta: {
                title: '给您发来一个红包'
            }
        },
        {
            path: '/me',
            name: 'me',
            component: () =>
                import ( /* webpackChunkName: "about" */ './views/me.vue'),
            meta: {
                title: '关于我'
            }
        },
        {
            path: '/fullscreen',
            name: 'fullscreen',
            component: () =>
                import ('@/components/fullscreen.vue'),
            meta: {
                title: '全屏体验'
            }
        },
        {
            path: '/results',
            name: 'results',
            component: () =>
                import ('@/components/results.vue'),
            meta: {
                title: '红包开奖'
            }
        },
        {
            path: '/release',
            name: 'release',
            component: () =>
                import ('@/components/release.vue'),
            meta: {
                title: '发布红包'
            }
        },
        {
            path: '*',
            name: 'negation',
            component: () =>
                import ('@/components/negation.vue'),
            meta: {
                title: '嗷哦！页面不见了'
            }
        }
    ]
})